using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace ShootThemUp.Sources.GameElements.Ships.Ennemies.Waves.Trajectories
{
    class SpiralTrajectory : IWaveTrajectory
    {
        private Vector2 center;
        private float radiusConst;
        private float exponentialConst;

        public SpiralTrajectory(Vector2 center, float radiusConst, float exponentialConst)
        {
            this.center = center;
            this.radiusConst = radiusConst;
            this.exponentialConst = exponentialConst;
        }

        public int GetX(float t)
        {
            return (int)(radiusConst * Math.Exp(exponentialConst * t) * Math.Cos(t) + center.X);
        }

        public int GetY(float t)
        {
            return (int)(radiusConst * Math.Exp(exponentialConst * t) * Math.Sin(t) + center.Y);
        }
    }
}
